Fixing “Could not Load File or Assembly” Error for CKS Dev Copy to SharePoint Root Command

Comments 0

Share to social media

I’ve got a SharePoint solution containing a standard SharePoint solution project and a SharePoint App project.  While trying to use CKS Dev to deploy mapped files for the standard SharePoint solution using context menu command Quick Deploy (CKSDev) > Copy to SharePoint Root I got the following error:

Could not load file or assembly ‘AssemblyName.dll’ or one of its dependencies.  The system cannot find the file specified.

Apparently CKS dev looks at all your SharePoint projects and attempts to load up the DLLs, even if your projects is a SharePoint App.  Unfortunately, SharePoint App projects do not compile into a DLL (because that would defeat the purpose).  CKS will probably fix this issue eventually, but if you encounter the error you can “trick” CKS dev into working by copying a DLL into your SharePoint App’s bin\debug\ folder and renaming the DLL to match the name of your project.  CKS dev will then work as expected.

Load comments

About the author

Damon Armstrong

See Profile

Damon Armstrong is a consultant with SystemwarePS in Dallas, Texas. He is also a blogger and author of Pro ASP.NET 2.0 Website Programming and SharePoint 2013 Essentials for Developers. He specializes in the Microsoft stack with a focus on web technologies like MVC, ASP.NET, JavaScript, and SharePoint. When not staying up all night coding, he can be found watching a bunch of kids, studying Biblical topics, playing golf, or recovering from staying up all night coding.